// 引入用户集合构造函数
const { User } = require('../../../model/user')

module.exports = async (req ,res) => {
  const { id } = req.params;
  // 向数据库查询用户信息
  let user = await User.findOne({ _id: id }).populate({path: 'title1', populate: {path: 'Tauthor'}}) 
  res.send({
    data: user,
    meta: {
      msg: '查询成功',
      status: 200
    }
  });
}